3.936 \(\int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^2} \, dx\)

Optimal. Leaf size=64 \[ \frac {\sin (e+f x) \cos ^3(e+f x)}{4 a^2 c^2 f}+\frac {3 \sin (e+f x) \cos (e+f x)}{8 a^2 c^2 f}+\frac {3 x}{8 a^2 c^2} \]

[Out]

3/8*x/a^2/c^2+3/8*cos(f*x+e)*sin(f*x+e)/a^2/c^2/f+1/4*cos(f*x+e)^3*sin(f*x+e)/a^2/c^2/f

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3522, 2635, 8} \[ \frac {\sin (e+f x) \cos ^3(e+f x)}{4 a^2 c^2 f}+\frac {3 \sin (e+f x) \cos (e+f x)}{8 a^2 c^2 f}+\frac {3 x}{8 a^2 c^2} \]

Antiderivative was successfully verified.

[In]

Int[1/((a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])^2),x]

[Out]

(3*x)/(8*a^2*c^2) + (3*Cos[e + f*x]*Sin[e + f*x])/(8*a^2*c^2*f) + (Cos[e + f*x]^3*Sin[e + f*x])/(4*a^2*c^2*f)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 3522

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[m, 0] || GtQ[m, n]))

Rubi steps

\begin {align*} \int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^2} \, dx &=\frac {\int \cos ^4(e+f x) \, dx}{a^2 c^2}\\ &=\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a^2 c^2 f}+\frac {3 \int \cos ^2(e+f x) \, dx}{4 a^2 c^2}\\ &=\frac {3 \cos (e+f x) \sin (e+f x)}{8 a^2 c^2 f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a^2 c^2 f}+\frac {3 \int 1 \, dx}{8 a^2 c^2}\\ &=\frac {3 x}{8 a^2 c^2}+\frac {3 \cos (e+f x) \sin (e+f x)}{8 a^2 c^2 f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a^2 c^2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 39, normalized size = 0.61 \[ \frac {12 (e+f x)+8 \sin (2 (e+f x))+\sin (4 (e+f x))}{32 a^2 c^2 f} \]

Antiderivative was successfully verified.

[In]

Integrate[1/((a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])^2),x]

[Out]

(12*(e + f*x) + 8*Sin[2*(e + f*x)] + Sin[4*(e + f*x)])/(32*a^2*c^2*f)

________________________________________________________________________________________

fricas [C]  time = 0.46, size = 68, normalized size = 1.06 \[ \frac {{\left (24 \, f x e^{\left (4 i \, f x + 4 i \, e\right )} - i \, e^{\left (8 i \, f x + 8 i \, e\right )} - 8 i \, e^{\left (6 i \, f x + 6 i \, e\right )} + 8 i \, e^{\left (2 i \, f x + 2 i \, e\right )} + i\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{64 \, a^{2} c^{2} f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^2,x, algorithm="fricas")

[Out]

1/64*(24*f*x*e^(4*I*f*x + 4*I*e) - I*e^(8*I*f*x + 8*I*e) - 8*I*e^(6*I*f*x + 6*I*e) + 8*I*e^(2*I*f*x + 2*I*e) +
 I)*e^(-4*I*f*x - 4*I*e)/(a^2*c^2*f)

________________________________________________________________________________________

giac [A]  time = 0.84, size = 61, normalized size = 0.95 \[ \frac {\frac {3 \, {\left (f x + e\right )}}{a^{2} c^{2}} + \frac {3 \, \tan \left (f x + e\right )^{3} + 5 \, \tan \left (f x + e\right )}{{\left (\tan \left (f x + e\right )^{2} + 1\right )}^{2} a^{2} c^{2}}}{8 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^2,x, algorithm="giac")

[Out]

1/8*(3*(f*x + e)/(a^2*c^2) + (3*tan(f*x + e)^3 + 5*tan(f*x + e))/((tan(f*x + e)^2 + 1)^2*a^2*c^2))/f

________________________________________________________________________________________

maple [C]  time = 0.27, size = 136, normalized size = 2.12 \[ \frac {i}{16 f \,a^{2} c^{2} \left (\tan \left (f x +e \right )+i\right )^{2}}+\frac {3 i \ln \left (\tan \left (f x +e \right )+i\right )}{16 f \,a^{2} c^{2}}+\frac {3}{16 f \,a^{2} c^{2} \left (\tan \left (f x +e \right )+i\right )}-\frac {3 i \ln \left (\tan \left (f x +e \right )-i\right )}{16 f \,a^{2} c^{2}}-\frac {i}{16 f \,a^{2} c^{2} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {3}{16 f \,a^{2} c^{2} \left (\tan \left (f x +e \right )-i\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^2,x)

[Out]

1/16*I/f/a^2/c^2/(tan(f*x+e)+I)^2+3/16*I/f/a^2/c^2*ln(tan(f*x+e)+I)+3/16/f/a^2/c^2/(tan(f*x+e)+I)-3/16*I/f/a^2
/c^2*ln(tan(f*x+e)-I)-1/16*I/f/a^2/c^2/(tan(f*x+e)-I)^2+3/16/f/a^2/c^2/(tan(f*x+e)-I)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^2,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

mupad [B]  time = 4.73, size = 38, normalized size = 0.59 \[ \frac {2\,\sin \left (2\,e+2\,f\,x\right )+\frac {\sin \left (4\,e+4\,f\,x\right )}{4}+3\,f\,x}{8\,a^2\,c^2\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((a + a*tan(e + f*x)*1i)^2*(c - c*tan(e + f*x)*1i)^2),x)

[Out]

(2*sin(2*e + 2*f*x) + sin(4*e + 4*f*x)/4 + 3*f*x)/(8*a^2*c^2*f)

________________________________________________________________________________________

sympy [A]  time = 0.42, size = 223, normalized size = 3.48 \[ \begin {cases} \frac {\left (- 4096 i a^{6} c^{6} f^{3} e^{10 i e} e^{4 i f x} - 32768 i a^{6} c^{6} f^{3} e^{8 i e} e^{2 i f x} + 32768 i a^{6} c^{6} f^{3} e^{4 i e} e^{- 2 i f x} + 4096 i a^{6} c^{6} f^{3} e^{2 i e} e^{- 4 i f x}\right ) e^{- 6 i e}}{262144 a^{8} c^{8} f^{4}} & \text {for}\: 262144 a^{8} c^{8} f^{4} e^{6 i e} \neq 0 \\x \left (\frac {\left (e^{8 i e} + 4 e^{6 i e} + 6 e^{4 i e} + 4 e^{2 i e} + 1\right ) e^{- 4 i e}}{16 a^{2} c^{2}} - \frac {3}{8 a^{2} c^{2}}\right ) & \text {otherwise} \end {cases} + \frac {3 x}{8 a^{2} c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))**2/(c-I*c*tan(f*x+e))**2,x)

[Out]

Piecewise(((-4096*I*a**6*c**6*f**3*exp(10*I*e)*exp(4*I*f*x) - 32768*I*a**6*c**6*f**3*exp(8*I*e)*exp(2*I*f*x) +
 32768*I*a**6*c**6*f**3*exp(4*I*e)*exp(-2*I*f*x) + 4096*I*a**6*c**6*f**3*exp(2*I*e)*exp(-4*I*f*x))*exp(-6*I*e)
/(262144*a**8*c**8*f**4), Ne(262144*a**8*c**8*f**4*exp(6*I*e), 0)), (x*((exp(8*I*e) + 4*exp(6*I*e) + 6*exp(4*I
*e) + 4*exp(2*I*e) + 1)*exp(-4*I*e)/(16*a**2*c**2) - 3/(8*a**2*c**2)), True)) + 3*x/(8*a**2*c**2)

________________________________________________________________________________________